package pl.gigiel.jme.behaviour.boidbody;

import pl.gigiel.behaviour.IBoid;
import pl.gigiel.behaviour.IBoidFeatures;

import com.jme.math.Vector3f;
import com.jme.scene.Node;
import com.jme.scene.TriMesh;
import com.jme.scene.shape.Sphere;

public class BuoyBody extends SimpleBoidBody {
	private static final long serialVersionUID = 1L;
	private static final int Z_SAMPLES = 6;
	private static final int RADIAL_SAMPLES = 5;

	public BuoyBody(Node parent, IBoid boid) {
		super(parent, boid);
	}

	@Override
	public void process(float elapsed) {
		// intentionally nothing
	}

	@Override
	protected TriMesh getTriMesh() {
		IBoidFeatures features = getBoid().getFeatures();
		Vector3f size = features.getSize();
		float radius = size.getX();
		TriMesh triMesh = new Sphere(Sphere.class.getName(), Z_SAMPLES, RADIAL_SAMPLES, radius);
		return triMesh;
	}

	@Override
	protected void initController() {
		// useless, because <code>process</code> do nothing
	}
}
